import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/home/home.vue'
import Index from '@/views/home/index.vue'
import Cart from '@/views/home/cart.vue'
import Cla from '@/views/home/cla.vue'
import My from '@/views/home/my.vue'
import Ym from '@/views/ym.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {path:'/',redirect:'/home/index'},
    {
      path: '/home',
      component: HomeView,
      children:[
        {path:'index',component:Index},
        {path:'cart',component:Cart},
        {path:'cla',component:Cla},
        {path:'my',component:My},
      ]
    },
    {path:'/ym',component:Ym}

  ],
})

export default router
